using System;
using System.Collections;

namespace Whitemice.MOGI.ZOGI
{
	public class CacheEntry
	{
		IMOGIObject o;
		int					hitCount;
		DateTime		refreshTime;
		
		public CacheEntry(IMOGIObject o)
		{
			hitCount = 0;
			this.o = o;
			refreshTime = DateTime.Now;
		}
		
		public string Name 
		{
			get { return o.Name; }
		}
		
		public void Touch()
		{
			hitCount++;
		}
		
		public int Hits
		{
			get { return hitCount; }
		}
		
		public DateTime RefreshTime
		{
			get { return refreshTime; }
		}
		
		public bool Refresh(Server server)
		{
			return true;
		}
		
		public bool Refresh(IMOGIObject newObject)
		{
			return true;
		}
		
		public IMOGIObject Object
		{
			get { return o; }
			set { o = value; }
		}
	}
}
